Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use log2_{v,h}_chroma_subsample #94

Closed
wants to merge 2 commits into from

Conversation

JeromeMartinez
Copy link
Contributor

@JeromeMartinez JeromeMartinez commented Jan 4, 2018

Use log2_{v,h}_chroma_subsample everywhere instead of using log2_{v,h}_chroma_subsample and {v,h}_chroma_subsample depending of the context.

Issue reported by @dwbuiten

& a small typo making the spec wrong.

ffv1.md Outdated

PDF:`h_chroma_subsample` indicates the subsample factor between luma and chroma width ($chroma\_width=2^{-log2\_h\_chroma\_subsample}luma\_width$).
RFC:`h_chroma_subsample` indicates the subsample factor between luma and chroma width (`chroma_width = 2^(-log2_h_chroma_subsample) * luma_width`).
PDF:`log2_h_chroma_subsample` indicates the subsample factor, stored in powers to which the number 2 must be raised, between luma and chroma width ($chroma\_width=2^{-log2\_h\_chroma\_subsample}luma\_width$).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest avoiding lowercase must to not confuse with RFC2119 meaning. Also stored in powers to which the number 2 must be raised seems passive wording. Could you say the base-two logarithm of the subsample factor...?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment applies 3x below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR updated with the suggested wording.

ffv1.md Outdated
@@ -941,8 +941,8 @@ Line( p, y ) { |

`plane_pixel_width[ p ]` is the width in pixels of plane p of the slice.
`plane_pixel_width[ 0 ]` and `plane_pixel_width[ 1 + ( chroma_planes ? 2 : 0 ) ]` value is `slice_pixel_width`.
PDF:If `chroma_planes` is set to 1, `plane_pixel_width[ 1 ]` and `plane_pixel_width[ 2 ]` value is $\lceil slice\_pixel\_width / v\_chroma\_subsample \rceil$.
RFC:If `chroma_planes` is set to 1, `plane_pixel_width[ 1 ]` and `plane_pixel_width[ 2 ]` value is `ceil(slice_pixel_width / v_chroma_subsample)`.
PDF:If `chroma_planes` is set to 1, `plane_pixel_width[ 1 ]` and `plane_pixel_width[ 2 ]` value is $\lceil slice\_pixel\_width / ( 1 << log2\_h\_chroma\_subsample) \rceil$.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, glad to see this fixed (v->h), though unclear why there's now a bitshift

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitshift is due to the use of log2 version of the value, and means "2 power x" (see Derek comment on CELLAR)

Copy link
Contributor

@dericed dericed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@retokromer retokromer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelni
Copy link
Member

"log2_v_chroma_subsample` indicates the subsample factor, stored in powers to which the number 2 must be raised between luma and chroma height" This sounds very odd, is this correct english ?

@JeromeMartinez
Copy link
Contributor Author

Should have been changed after Dave comment, something went wrong, I force update tomorrow.

@JeromeMartinez
Copy link
Contributor Author

@michaelni I check the current version of the PR, the text you are looking at is from a former version of the PR, now you should have the base-two logarithm of the subsample factor.
The version you have was rejected by reviewer, commit 546305a is the one accepted by reviewers.

@michaelni
Copy link
Member

73e6f51 introduces a typo: (,)
after "stored in powers to which the number 2 must be raised" there is a , in one line but not in the other

@JeromeMartinez
Copy link
Contributor Author

Fixed + rebased.

@michaelni michaelni closed this in 50c3501 Jan 10, 2018
@JeromeMartinez JeromeMartinez deleted the chroma_subsample branch June 23, 2020 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants